const mongoose = require("mongoose");

const UserSchema = new mongoose.Schema({
  name: { type: String },
  password: { type: String, default: "123456" },
  card: { type: String },
  phone: { type: String },
  status: { type: String }, //岗位 === 在岗 ? 离职
  identity: { type: String }, //身份  === 管理员 ？ 员工
  createdAt: { type: Date, default: Date.now },
  editor: { type: String }, // 登录权限
});

module.exports = User = mongoose.model("users", UserSchema);
